$(function (){
	var dbid = $('._db_id').val();

	//上一步
	$('._prev_step').click(function (){
		location.href="/Structure/connectdb.html?id="+dbid;
	});

	//下一步
	$('._next_step').click(function (){
		//获取选择的表
		// var selected_table = $('._radio_table input[name="mysql"]:checked').val();
		var selected_table = $('input:radio[name="mysql"]:checked').val();
		if(selected_table=='' || selected_table=='undefined'){
			show_msg({msg:'请选择导入数据表名称',type : 'warning'});
			return false;
		}

		//ajax提交
		$.ajax({
		    url:'/Structure/selectdbtable.html',
		      type:'POST',
		      dataType:'json',
		      async:true,
		      data:{id:dbid,selected_table:selected_table},
		      success:function (req){
		        if(req.status==200){
		        	location.href="/Structure/dbfieldrule.html?id="+dbid;
		        }else{
		          show_msg({msg:req.msg,type : 'warning'});
		        }
		        return;
		      }
		  });
	});

	//搜索过滤


	//

});